/*
 * ortho_camera.h
 *
 *  Created on: 19-jun-2009
 *      Author: HPK
 */

#ifndef ORTHO_CAMERA_H_
#define ORTHO_CAMERA_H_

#include "camera.h"
#include "model/cube.h"

class OrthoCamera : public Camera{
	protected:
		Cube _viewVolume;
		Point _eye;
		Point _at;
		Point _up;
		float yztheta;
		float xytheta;

	public:
		// fovUp se indica en grados
		OrthoCamera(Point eye,Point at,Point up,const Cube& viewVolume);

		virtual ~OrthoCamera();

		virtual void applyCamera();

		virtual void move(float offset);

		virtual bool isBoxVisible(const Cube& box)const;

		virtual Point getAt(){
			return _at;
		}
		virtual Point getEye(){
			return _eye;
		}
		virtual Point getUp(){
			return _up;
		}

		void rotate(float theta);

		const Cube& getViewVolume()const{ return _viewVolume; }
		Cube& getViewVolume(){ return _viewVolume; }
		void setViewVolume(const Cube& view){ _viewVolume=view; }

		virtual void updatePosition(const Point& position,const Point& direction,PathInfo* info);
	protected:
		virtual void applyModelViewTransformations();
};

#endif /* ORTHO_CAMERA_H_ */
